package model;

import java.io.Serializable;

public class Movie implements Serializable {
    private String id;
    private String title;
    private String director;
    private String actors;
    private String plot;
    private int duration; // 电影时长（分钟）
    private double rating; // 评分（0-10分）

    public Movie(String id, String title, String director, String actors, String plot, int duration, double rating) {
        this.id = id;
        this.title = title;
        this.director = director;
        this.actors = actors;
        this.plot = plot;
        this.duration = duration;
        this.rating = rating;
    }

    public String getId() {
        return id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getActors() {
        return actors;
    }

    public void setActors(String actors) {
        this.actors = actors;
    }

    public String getPlot() {
        return plot;
    }

    public void setPlot(String plot) {
        this.plot = plot;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public double getRating() {
        return rating;
    }

    public void setRating(double rating) {
        this.rating = rating;
    }

    @Override
    public String toString() {
        return "片名：" + title + "\n" +
               "导演：" + director + "\n" +
               "主演：" + actors + "\n" +
               "剧情简介：" + plot + "\n" +
               "时长：" + duration + "分钟\n" +
               "评分：" + rating + "分";
    }
} 